package cn.jasonone.bbs.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.jasonone.bbs.bean.Block;
import cn.jasonone.bbs.mapper.BlockMapper;
import cn.jasonone.bbs.service.BlockService;

@Service("blockService")
public class BlockServiceImpl implements BlockService {
	@Resource
	private BlockMapper blockMapper;

	@Override
	public List<Block> findAll(Block t) {
		return blockMapper.findAll(t);
	}

	@Override
	public Block findByID(Long id) {
		return blockMapper.findByID(id);
	}

	@Override
	public boolean insert(Block t) {
		// TODO Auto-generated method stub
		return blockMapper.insert(t) > 0;
	}

	@Override
	public boolean update(Block t) {
		return blockMapper.update(t) > 0;
	}

	@Override
	public boolean delete(Block t) {
		return blockMapper.delete(t) > 0;
	}

}
